﻿using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace AdRotatorExampleWin8
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class AdRotatorBlankPage : Page
    {
        public AdRotatorBlankPage()
        {
            this.InitializeComponent();
            Loaded += AdRotatorBlankPage_Loaded;
        }

        void AdRotatorBlankPage_Loaded(object sender, RoutedEventArgs e)
        {
            AdRotatorWin8.DefaultHouseAdBody = new MyDefaultAd();
            AdRotatorWin8.Invalidate();
        }

        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }

        private void backButton_Click(object sender, RoutedEventArgs e)
        {
            this.Frame.GoBack();
        }
    }
}
